import request from '@/utils/request'
//新增紧急联系人
export function addMemergencyContact2(data) {
  return request({
    url: '/MemergencyContact/insertSelective',
    method: 'post',
    data: data
  })
}

//修改紧急联系人
export function addMemergencyContact(data) {
  return request({
    url: '/MemergencyContact/insertSelective',
    method: 'post',
    data: data
  })
}


// 查询住院登记列表
export function listBeinhospital(query) {
  return request({
    url: '/nurse/beinhospital/list',
    method: 'get',
    params: query
  })
}
//查询住院登记信息
export function listBeinhospital2(query) {
  return request({
    url: '/nurse/beinhospital/list2',
    method: 'get',
    params: query
  })
}
// 查询患者信息以及全部的就诊记录（孟迪）
export function listjiuzhen(query) {
  return request({
    url: '/mpatient/selectAll',
    method: 'get',
    params: query
  })
}

// 查询员工信息（孟迪）
export function getMEmoployee(employeeId) {
  return request({
    url: '/Memployee/selectEmployeeByEmployeeId',
    method: 'get',
    params: {
      employeeId: employeeId // 将员工ID作为查询参数传递
    }
  });
}
// 查询全部员工信息(孟迪)
export function getMEmoployee2(query) {
  return request({
    url: '/Memployee/selectall',
    method: 'get',
    params: query
  })
}
//根据id查询科室（孟迪）
export function getMdepartment(departmentId) {
  return request({
    url: '/Mdepartments/selectDepartmentId',
    method: 'get',
    params: {
      id: departmentId // 将部门ID作为查询参数传递
    }
  });
}
//查询所有的科室
export function getMdepartment2() {
  return request({
    url: '/Mdepartments/selectall',
    method: 'get',
  });
}

// 查询住院登记详细
export function getBeinhospital(registrationId) {
  return request({
    url: '/nurse/beinhospital/' + registrationId,
    method: 'get'
  })
}

// 新增住院登记
export function addBeinhospital(data) {
  return request({
    url: '/nurse/beinhospital',
    method: 'post',
    data: data
  })
}

// 修改住院登记
export function updateBeinhospital(data) {
  return request({
    url: '/nurse/beinhospital',
    method: 'put',
    data: data
  })
}

// 删除住院登记
export function delBeinhospital(registrationId) {
  return request({
    url: '/nurse/beinhospital/' + registrationId,
    method: 'delete'
  })
}
